public class VM_Client{

  private enum Option { SEND, REFRESH, ERROR };
  
  static public void main( String args[] ) {
    //TODO: Control de corrección en la entrada

    String host = "localhost";

    // Es determina quin metode es vol invocar
    Option op = Option.ERROR;
    if(args.length > 0) {
      if(args[0].equals("send"))      op = Option.SEND;
      else if(args[0].equals("refresh")) op = Option.REFRESH;
    }
    if (op==Option.ERROR){
      System.out.println("Opció incorrecte.");
      System.out.println("Sintaxi d'us: java Client_VM [ send | refresh ] [parameters]");
      return;
    }
    else{
      switch (op){
	case SEND:
	  new VM_Client_Send( host, 4444, args[1], args[2], args[3], args[4] );
	break;
	case REFRESH:
	  new VM_Client_Refresh( host, 3333 );
      }
  
    }

  }

}